/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package autobazarparser;

import java.io.IOException;
import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

/**
 *
 * @author Ahmad Samir
 */
public class CarData implements DataSource {

    private Document doc;
    private Connection con;
    private String source;

    public CarData(String url) throws IOException {
        source = url;
        con = Jsoup.connect(source);
        doc = con.get();
    }

    @Override
    public Document getData() {
        return doc;
    }

    @Override
    public String getSource() {
        return source;
    }
}
